<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Turn on or off additional debugging output.</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="samconnection.send.html">SAMConnection::send</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="samconnection.subscribe.html">SAMConnection::subscribe</a></div>
 <div class="up"><a href="ref.sam.html">SAM 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="samconnection.setdebug" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SAMConnection::setDebug</h1>
  <p class="verinfo">(PECL sam &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">SAMConnection::setDebug</span> &mdash; <span class="dc-title">
   Turn on or off additional debugging output.
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-samconnection.setdebug-description">
  <h3 class="title">说明</h3>
  <p class="para">
  The &quot;setdebug&quot; method is used to turn on or off additional debugging output. The SAM framework will provide method/function
  entry and exit trace data plus additional information. Protocol specific implementations also provide extra output.
  </p>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>SAMConnection::setDebug</strong></span>
    ( <span class="methodparam"><span class="type">bool</span> <code class="parameter">$switch</code></span>
   )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-samconnection.setdebug-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">switch</code></em></dt>

     <dd>

      <p class="para">
        If this parameter is set to <strong><code>TRUE</code></strong> additional debugging output will be provided. If the value is set to <strong><code>FALSE</code></strong> output
        of additional information will be stopped.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-samconnection.setdebug-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-samconnection.setdebug-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4444">
    <p><strong>Example #1 Turn on debugging output</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$conn</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setdebug</span><span style="color: #007700">(</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-4445">
    <p><strong>Example #2 Turn off debugging output</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$conn</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setdebug</span><span style="color: #007700">(</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="samconnection.send.html">SAMConnection::send</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="samconnection.subscribe.html">SAMConnection::subscribe</a></div>
 <div class="up"><a href="ref.sam.html">SAM 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
